<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="col-sm-12">
			<div class="ibox">
				<div class="ibox-body">
					<div class="fixed-table-toolbar">
						<div class="columns pull-left">  
							<button type="button" class="btn btn-primary" id="test1" >
                           		<i class="fa fa-coffee" aria-hidden="true"></i>上传工作流文件
                        	</button>  
						</div> 
					</div>
					<table id="dynamic-table" data-mobile-responsive="true" class="newtab">
					</table>
				</div>
			</div>
		</div>
	</div>
	<!--shiro控制bootstraptable行内按钮看见性 -->
		<div>
			<script type="text/javascript">
			    var s_add_h = 'hidden';
				var s_edit_h = 'hidden';
				var s_remove_h = 'hidden'; 
			</script>
		</div>
		<div shiro:hasPermission="news:manage:edit">
			<script type="text/javascript">
				s_edit_h = '';
			</script>
		</div>
		<div shiro:hasPermission="news:manage:add">
			<script type="text/javascript">
				s_add_h = '';
			</script>
		</div>
		<div shiro:hasPermission="news:manage:remove">
			<script type="text/javascript">
				var s_remove_h = '';
			</script>
		</div> 
	</div>
 
<div th:include="include :: footer"></div>
<script type="text/javascript"  src="/js/activiti/runningprocess_list.js?v=1"></script>
<script type="text/javascript" src="/js/layui.js"></script>
<script type="text/javascript" src="/js/plugins/layer/layer.min.js"></script>
<script type="text/javascript">
	layui.use('upload', function () {
	    var upload = layui.upload;
	    //执行实例
	    var uploadInst = upload.render({
	        elem: '#test1', //绑定元素
	        url: 'uploadworkflow', //改成您自己的上传接口
	       // auto:false, 
	        field:'uploadfile',
	        size: 1000,
	        multiple:false,
	        number:1,
	        accept: 'file',//普通文件
	        done: function(res){
	        	$('#dynamic-table').bootstrapTable('refresh'); 
	            console.log(res);
	            if(res.code == 200){
	              	return layer.msg('部署成功');
	            }else{
	            	 return layer.msg('上传失败');
	            } 
	        }
	    });
	});

</script>
</body>

</html>